package com.demo.dao.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SearchOfferMapper {

    //获取scoring_offer当前offerId的最大值，用来缩小查找范围，提高查询速度
    String selectMaxScoringOfferId();

    //获取拥有指定campaign_subtype类型的orbp offer的用户(100条数据)
    List<OfferDetail> selectOrbpOffer(@Param("offerId") String offerId, @Param("campaign_subtype") String campaign_subtype, @Param("env") String env, @Param("idCardTail") String idCardTail);

    //查询经过orbp流程后生成的P-offer,可能会生成多个p-offer
    List<String> selectOrbp2Poffer(@Param("personId") String personId);

    //通过banner获取 offer的详细信息，用于创建合同
    OfferDetail getOfferDetailFromBanner(@Param("personId") String personId, @Param("campaign_subtype") String campaign_subtype);

    //通过inbox message获取 offer的详细信息，用于创建合同
    OfferDetail getOfferDetailFromInboxMessage(@Param("personId") String personId, @Param("campaign_subtype") String campaign_subtype);
}
